package com.taobao.diamond.demo;

import com.taobao.diamond.manager.DiamondManager;
import com.taobao.diamond.manager.ManagerListener;
import com.taobao.diamond.manager.impl.DefaultDiamondManager;

import java.util.concurrent.Executor;

/**
 * @author: huc
 * @description: 类说明
 * @package: com.taobao.diamond.demo
 * @date: 2020 2020/5/16 11:50
 * @version: V1.0.1
 */
public class DiamondDemo {

    public static void main(String[] args) {
        DiamondManager diamondManager = new DefaultDiamondManager("rule", "filter",
                new ManagerListener() {
                    @Override
                    public void receiveConfigInfo(String configInfo) {
                        System.out.println("receiveConfigInfo" + configInfo);
                    }

                    @Override
                    public Executor getExecutor() {
                        return null;
                    }
                });
        String availableConfigureInfomation = diamondManager.getAvailableConfigureInfomation(5000);
        System.out.println("diamond值" + availableConfigureInfomation);

    }

}
